// JavaScript Document
<!--
function rightfloatcss(){
  var cssstr="";
  cssstr+='<style type=\"text/css\">';
  cssstr+='#siderIMchat_main {margin:0; width: 110px;color:#333}';
  cssstr+='#siderIMchat_main img{border:0;}';
  cssstr+='#siderIMchat_main a{color:#036;}';
  cssstr+='#siderIMchat_main a:hover{color:#f30}';
  cssstr+='#siderIMchat_main .top {background: url(/css/images/top.gif) left top no-repeat; height: 70px}';
  cssstr+='#siderIMchat_main .infobox {text-align: center; padding: 5px; line-height: 14px; background: url(http://www.piaoxian.net/kf/images/middle.gif) #bdc5cb no-repeat; color: #000; font-weight: bold; }';
  cssstr+='#siderIMchat_main .bg {background: url(/css/images/middle.gif) left top repeat-y;padding:0;}';
  cssstr+='#siderIMchat_main ul {margin:0;}';
  cssstr+='#siderIMchat_main ul li {list-style:none;padding:10px 0 10px 20px;line-height:20px;}';
  cssstr+='.qqkf{display:block;}';
  cssstr+='#siderIMchat_main .close {width:100%;text-align:center}';
  cssstr+='#siderIMchat_main .bottom {background: url(/css/images/bottom.gif) left top no-repeat; height:14px; overflow: hidden}';
  cssstr+='</STYLE>';
  return cssstr;
}

function rightfloatcontent(){
  var contentstr="";
  contentstr+='<div id="QuickMenu" style="right:3px;top:230px;position:absolute;">';
  contentstr+='<div id="RightMenu" style="float:right;overflow: hidden;display:none;">';
  contentstr+='<div style="margin:0;padding:0px;border:0px;overflow: hidden;">';
  contentstr+='<div id="siderIMchat_main">';
  contentstr+='<div class="top"></div>';
  contentstr+='<!-- 中间开始-->';
  contentstr+='<div class="bg">';
  contentstr+='<ul>';
  contentstr+='<li><img src="/css/images/msn.gif" height="17" border="0" align="middle">&nbsp;&nbsp;<a class="qqa" target="_blank" href="msnim:chat?contact=kalsing8@hotmail.com" title="online communication">MSN</a></li>';
  contentstr+='<li><img src="http://wpa.qq.com/pa?p=1:2209964989:17&site=qq&menu=yes" height="17" border="0" align="middle">&nbsp;&nbsp;<a class="qqa" target="_blank" href="tencent://message/?uin=2209964989" title="online communication">QQ</a></li>';
  contentstr+='<li><img src="/css/images/skype.gif" height="17" border="0" align="middle">&nbsp;&nbsp;<a class="qqa" target="_blank" href="tencent://message/?uin=2209964989" title="online communication">SKYPE</a></li>';
  contentstr+='<li><img src="/css/images/email.gif" height="17" border="0" align="middle">&nbsp;&nbsp;<a class="qqa" target="_blank" href="tencent://message/?uin=2209964989" title="online communication">E-MAIL</a></li>';
  contentstr+='</ul>';
  contentstr+='</div>';
  contentstr+='<!--中间结束-->';
  contentstr+='<div class="bottom"></div>';
  contentstr+='</div>';
  contentstr+='</div>';
  contentstr+='</div>';
  contentstr+='<div style="float:right;width:19px;border: 0px;cursor:pointer;"><img id="menutop" onMouseOver="javascript:ChangeMenu(\'RightMenu\',115,500)" border="0" src="/css/images/online.gif"></div>';
  contentstr+='</div>';
  return contentstr;
}

document.writeln(rightfloatcss());
document.writeln(rightfloatcontent());

var QuickScrollYLast=0;
var QuickMenu=document.getElementById("QuickMenu")

window.setInterval("LoadMenu()",1);

function LoadMenu(){
    var QuickScrollYDefault;
    if(document.documentElement&&document.documentElement.scrollTop){
        QuickScrollYDefault=document.documentElement.scrollTop;
    }else if(document.body){
        QuickScrollYDefault=document.body.scrollTop;
    }else{
    }
    QuickPercent=.1*(QuickScrollYDefault-QuickScrollYLast);
    if(QuickPercent>0){
        QuickPercent=Math.ceil(QuickPercent);
    }else{
        QuickPercent=Math.floor(QuickPercent);
    }
    QuickMenu.style.top=parseInt(QuickMenu.style.top)+QuickPercent+"px";
    QuickScrollYLast=QuickScrollYLast+QuickPercent;
}

var MenuX;
var MenuY;
var MenuCloseX;
var MenuCloseY;
function ChangeMenu(id,menuwidth,menuheight){
    clearInterval(MenuX);
    clearInterval(MenuY);
    clearInterval(MenuCloseX);
    clearInterval(MenuCloseY);
    var o = document.getElementById(id);
    if(o.style.display == "none"){
        o.style.display = "block";
        o.style.width = "1px";
        o.style.height = "1px"; 
        MenuX = setInterval(function(){menuopenx(o,menuwidth,menuheight)},30);
        document.getElementById("menutop").src="/css/images/close.gif";
    }else{
        document.getElementById("menutop").src="/css/images/online.gif";
        MenuCloseY = setInterval(function(){menuclosex(o)},30);
    }
}
function menuopenx(o,x,y){/*--打开x--*/
    var menucx = parseInt(o.style.width);
    if(menucx < x){
        o.style.width = (menucx + Math.ceil((x-menucx)/5)) +"px";
    }else{
        clearInterval(MenuX);
        //MenuY = setInterval(function(){menuopeny(o,y)},30);
    }
    var menucy = parseInt(o.style.height);
    if(menucy < y){
        o.style.height = (menucy + Math.ceil((y-menucy)/5)) +"px";
    }else{
        clearInterval(MenuY); 
    }
}

function menuopeny(o,y){/*--打开y--*/ 
    var menucy = parseInt(o.style.height);
    if(menucy < y){
        o.style.height = (menucy + Math.ceil((y-menucy)/5)) +"px";
    }else{
        clearInterval(MenuY); 
    }
} 

function menuclosex(o){/*--打开x--*/
    var menucx = parseInt(o.style.width);
    if(menucx > 0){
        o.style.width = (menucx - Math.ceil(menucx/5)) +"px";
    }else{
        clearInterval(MenuCloseX);
        //MenuCloseX = setInterval(function(){menuclosey(o)},30);
    }
    var menucy = parseInt(o.style.height);
    if(menucy > 0){
        o.style.height = (menucy - Math.ceil(menucy/5)) +"px";
    }else{
        clearInterval(MenuCloseY); 
        o.style.display = "none";
    }
} 
function menuclosey(o){/*--打开y--*/ 
    var menucy = parseInt(o.style.height);
    if(menucy > 0){
        o.style.height = (menucy - Math.ceil(menucy/5)) +"px";
    }else{
        clearInterval(MenuCloseY); 
        o.style.display = "none";
    }
} 

//>
